home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
HPAVC
/
HPAVC CD-ROM.iso
/
CAN_PAK1.ZIP
/
SEE.ZIP
/
SEE.DOC
next >
Wrap
Text File
|
1987-10-09
|
10KB
|
190 lines
SEE Version 1.7 October 9, 1987
COPYRIGHT 1987
by
ABACUS Computer Service
Donald J. Jackowski
16 Green Road
Mine Hill, NJ 07801
(201) 584-8201
All Rights Reserved
INTRODUCTION
SEE is a utility program that allows a user to display a
file containing non-printable characters and to make limited
modifications to the input to create a file that most text
editors can handle. An option is provided to strip (Ignore)
printer control sequences, making it easy to create a pure ASCII
file from one containing printer control characters.
Non-printable characters are divided into two classes, those
in the numeric range 0 through 31 are considered CONTROL
characters except for the four characters that normally occur in
text files namely the "newline" character (10, ^J, \n, NL), the
"return" character (13, ^M, \r, CR), the "tab" character (9, ^I,
\t, TAB) and the "formfeed" character (12, ^L, \f, FF). The
second class called GRAPHIC characters is comprised of all the
characters in the numeric range 127 through 255. Some text
editing programs will not operate correctly on a file containing
either class of non-printable characters and many programs take
the control character 26 (^Z) to be an End Of File marker. SEE
offers a mechanism to allow the user to visually observe the
characters contained in ANY file and then make some limited
substitutions that will render the output acceptable to any text
editor.
USAGE
The SEE program usage is:
SEE [-aipstNwNiho] file ...
Where:
-a = show ALL characters.
-i = Ignore ALL non-printing characters.
-p = Ignore ALL Printer control sequences.
-s = Substitute a 'space' for each control character.
-ss = Substitute a 'space' for each non-printing char.
-tN = Set Tab Stop value. (default 8)
-wN = Set output column Width. (default 78)
-h = Show Hex values.
-o = Show Octal values.
When SEE is invoked with no arguments or if invalid options
are given, a short menu is displayed. When SEE is invoked with
one or more file names but no options the contents of each file
is displayed, all normally non-printing characters are displayed
as a series of regular printing characters. CONTROL characters
are displayed in the ^A style and GRAPHIC characters are
displayed as a three digit number surrounded by the <> character
pair.
Copyright 1987 (C) by ABACUS Computer Service Page 1 of 3
SEE Version 1.7 October 9, 1987
OPERATION
The control characters "new line", "return", "tab", and
"form feed" are displayed as normal characters unless the -a
option is given in which case they are displayed as ^J, ^M, ^I,
and ^L. When the -a option is given the length of each output
line is a result of the default column Width setting unless this
default is changed with the -w option.
The -s option can be used to cause SEE to substitute a
'space' character (decimal 32) for each occurrence of a any
control character, if used in conjunction with the -a option the
substitution includes the "new line", "return", "tab", and "form
feed" characters. If the -ss option is given a 'space' character
is substituted for each GRAPHIC character" as well as each
CONTROL character."
The -i option will ignore both CONTROL and GRAPHIC
characters and will override and disable the -s option.
The -p option will ignore printer control sequences and
automatically turns on the -i option. This option uses a table
to determine the number of bytes to ignore after an ESC (decimal
27) character. The default table contains the data appropriate
for an EPSON FX-85 printer but can be easily modified for other
printers as outlined under OTHER PRINTERS.
The SEE output (normally displayed on the screen) can be
redirected to a file. For example the command line:
SEE file >temp
Will place the output in the file named TEMP.
Since SEE does not actually display on the screen but
depends on the DOS to do the actual display the -t option will
NOT affect the actual display. The -t option is intended to
provide tab setting control when SEE calculates how many
characters to permit on a line, and is generally only needed in
conjunction with the -w option. SEE expects both the -t and -w
options to be given with a number, the first digit of the number
may be given immediately after the option letter or may be
separated from the option letter by a 'space', thus the command
lines:
SEE -w45 file and
SEE -w 45 file
Are equivalent, both set the column width to 45.
NOTE
An interesting use of SEE is to look for message strings in
normally unprintable executable files (i.e .EXE and .COM files).
For example the command line:
SEE -i SEE.EXE
Will display some random characters, some of the actual machine
codes, and all of the internal messages.
Copyright 1987 (C) by ABACUS Computer Service Page 2 of 3
SEE Version 1.7 October 9, 1987
USER LICENSE
If you find this program useful you are requested to send a
$10 registration and license fee to ABACUS Computer Service.
This fee will entitle you to continue that use with a clear
conscience. Please pass a copy to a friend! It is NOT necessary
to be a licensed user to distribute copies. All registered users
will receive notice of the first update that is made after their
registration.
OTHER PRINTERS
The following information is intended as an aid to those who
use a printer requiring different control sequences than the
EPSON FX-85. All the ESCAPE sequence byte length data are
maintained in a single table to make modification easier, this
internal table, used by the -p option, contains the number of
bytes to be taken as part of an ESCAPE (27) sequence is:
/* 0 1 2 3 4 5 6 7 8 9*/
/* -------------------------------------------------------*/
/* 00 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/* 10 */ 0, 0, 0, 0, 1, 1, 0, 0, 0, 0,
/* 20 */ 0, 0, 0, 0, 0, 2, 0, 0, 0, 0,
/* 30 */ 0, 0, 2, 2, 0, 1, 3, 2, 0, 0,
/* 40 */ 0, 0, 0, 0, 0, 2, 0, 2, 1, 1,
/* 50 */ 1, 2, 1, 1, 1, 1, 1, 1, 0, 0,
/* 60 */ 1, 1, 1, 0, 1, 2, 9, 2, 9, 1,
/* 70 */ 1, 1, 1, 2, 2, 0, 0, 1, 2, 1,
/* 80 */ 1, 2, 2, 2, 1, 2, 0, 2, 0, 0,
/* 90 */ 0, 0, 3, 0, 0, 0, 0, 2, 9, 0,
/* 100 */ 0, 0, 0, 0, 0, 2, 2, 0, 2, 0,
/* 110 */ 0, 0, 2, 0, 0, 2, 0, 0, 0, 0,
/* 120 */ 2, 0, 0, 0, 0, 0, 0, 0
This table contains an entry for each of the 128 character
values that could be the byte immediately following the ESCAPE
byte. This table begins at 2A42H in the SEE.EXE file. The zero
values in this table represent "Unexpected ESCAPE sequences", an
error message is displayed if any such ESCAPE sequence is found
in the input. The values 1 through 8 represent the length of the
ESCAPE sequence, excluding the ESC character. EXAMPLE: row 50,
column 1 represents 51 which is the decimal value of the ASCII
character '3' and the printer ESCAPE sequence:
27 51 (n)
The length of this ESCAPE sequence, excluding the ESC
character is two.
The value 9 is interpreted to mean that the next NULL input
byte marks the end of the ESCAPE sequence. EXAMPLE: row 60,
column 8 represents 68 which is the decimal value of the ASCII
character 'D' and the printer ESCAPE sequence:
27 68 (n1) (n2) ... 0 (NULL)
The length of this sequence is signaled by the terminating
NULL (zero) byte.
If you alter this table to accommodate a different printer I
would appreciate if you would send a copy of your table along
with the printer make and model to: ABACUS Computer Service.
Future versions of SEE will include the data we receive on other
printers, and/or an "install" program.
Copyright 1987 (C) by ABACUS Computer Service Page 3 of 3